package com.jiangyao.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 收藏与点赞
 * </p>
 *
 * @author xiangyan
 * @since 2020-08-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Collect extends Model<Collect> {

    private static final long serialVersionUID=1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 类型 1-职位 2-课堂课件
     */
    private Integer type;

    /**
     * 类型 1-收藏 2-点赞
     */
    private Integer action;

    /**
     * 成员ID
     */
    private Integer userId;

    /**
     * 关联ID 类型为职位时是jobId，类型为课堂课件时是coursewareId
     */
    private Integer relateId;

    /**
     * 学期课程ID
     */
    private Integer clsubId;

    /**
     * 生成时间
     */
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
